package com.lyj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyj.pojo.DeviceRoomMapping;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeviceRoomMappingMapper extends BaseMapper<DeviceRoomMapping> {
    // 根据设备ID查询映射关系
    DeviceRoomMapping selectByDeviceId(@Param("deviceId") Integer deviceId);

    // 根据设备ID删除映射关系
    void deleteByDeviceId(@Param("deviceId") Integer deviceId);

    // 根据房间ID查询所有关联设备
    List<DeviceRoomMapping> selectByRoomId(@Param("roomId") Integer roomId);
}